package com.smart.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.smart.model.domain.UnitDO;
import com.smart.model.request.UnitRequest;
import com.smart.model.vo.UnitVO;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author zhanghong
 */
public interface UnitService extends IService<UnitDO> {
    /**
     * 根据主键查询
     * @param id
     * @return
     */
    UnitVO getByKey(long id);
    /**
     * 分页查询
     * @param request
     * @return
     */
    PageInfo<UnitVO> pageQuery(UnitRequest request, Pageable pageable);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(UnitRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(UnitRequest request);
    /**
     * 根据主键删除
     * @param id
     * @return
     */
    Boolean deleteByKey(long id);

}
